import request from "../request"
const api3='/apigb';


// 获取用户列表
export function getUserList(params) {
  return request({
    url: '/api3/users',
    method: 'get',
    params
  })
}

// 获取单个用户信息
export function getUserDetail(params) {
  return request({
    url: '/api3/users/user',
    method: 'get',
    params
  })
}

// 创建用户
export function createUser(data) {
  console.log(data, 'Raw data');
  return request({
    url: '/api3/users',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json'
    },
  });
}
// 更新用户
export function updateUser(data) {
  return request({
    url: '/api3/users',
    method: 'put',
    data
  })
}

// 删除用户
export function deleteUser(params) {
  return request({
    url: '/api3/users',
    method: 'delete',
    params
  })
}

